package acwing.算法进阶打卡;/**
 * @author： li
 * @date： 2022-03-18 16:34
 * @version 1.0
 */
import java.util.Scanner;
public class 非递归实现指数型枚举{
    static int n;
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for (int i = 0; i < Math.pow(2,n); i++) {
            for (int j = 0; j < n; j++){
                if ((i >> j & 1) == 1) System.out.print(j + 1 + " ");
            }
            System.out.println();
        }
        sc.close();
    }
}